//
//  HTGoodsSpecialCell.m
//  TruckUser
//
//  Created by Ting Han on 2017/10/16.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import "HTGoodsSpecialCell.h"
#import "UIView+Layout.h"
@interface HTGoodsSpecialCell()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIView *redView;
@property (weak, nonatomic) IBOutlet UILabel *numberLabel;

@end

@implementation HTGoodsSpecialCell

- (void)setGoodsSpecialModel:(HTGoodsSpecialModel *)goodsSpecialModel{
    _goodsSpecialModel = goodsSpecialModel;
    self.titleLabel.text = [NSString stringWithFormat:@"%@-%@",goodsSpecialModel.from,goodsSpecialModel.to];
    if ([goodsSpecialModel.unreads integerValue]<=0) {
        self.redView.hidden = YES;
    }else{
        self.redView.hidden = NO;
        self.numberLabel.text = goodsSpecialModel.unreads;
    }
    
}
- (void)setupAllLine{
    self.titleLabel.text = [NSString stringWithFormat:@"全部路线"];
    self.redView.hidden = YES;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    self.redView.layer.masksToBounds = YES;
    self.redView.layer.cornerRadius = self.redView.width/2.0;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

   
}

@end
